/*
	Flie:						CSpriteAnimatorFireball.h
	Course:				SGD 1207
	Author:				Kori Po
	Purpose:			Run fireball attack animation
*/

#include "../SGD Wrappers/CSGD_TextureManager.h"
#include <cassert>

#pragma once

class CSpriteAnimatorFireball
{
private:
	// cell algorithm data
	int		m_nFrameWidth;
	int		m_nFrameHeight;

	int		m_nNumCols;
	int		m_nNumRows;


	// animation data
	int		m_nCurFrame;
	int		m_nMaxFrames;

	float	m_fTimePerFrame;
	float	m_fTimeWaited;

	bool	m_bIsPlaying;
	bool	m_bIsLooping;
	
	float	m_fSpeed;			// 1.0f = normal, 0.5f = half, 2.0f = twice as fast!

	// image
	int		m_nImageID;

	CSGD_TextureManager*		m_TextureGuy;


public:
	// Def Con & Decon
	CSpriteAnimatorFireball(void);
	~CSpriteAnimatorFireball(void);

	// Running Functions
	void CSpriteAnimatorFireball::Update( float fElapsedTime );
	void CSpriteAnimatorFireball::Render( int nX, int nY, float fScale, float fRotation, DWORD dwColor );

	// Instance Functions
	void CSpriteAnimatorFireball::Play( bool bLoop, float fSpeed );
	void CSpriteAnimatorFireball::Stop( void );
	void CSpriteAnimatorFireball::Resume( void );

	//Misc
	RECT CellAlgorithm( int id );

};

